hill climbing algorithm code in python